/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package server.domain;

import java.io.Serializable;

/**
 *
 * @author fillipe
 */
public class PKOrderItem implements Serializable{

    private Order order;
    private Product product;

    public PKOrderItem() {
    }

    public PKOrderItem(Order order, Product product) {
        this.order = order;
        this.product = product;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final PKOrderItem other = (PKOrderItem) obj;
        if (this.order != other.order && (this.order == null || !this.order.equals(other.order))) {
            return false;
        }
        if (this.product != other.product && (this.product == null || !this.product.equals(other.product))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 89 * hash + (this.order != null ? this.order.hashCode() : 0);
        hash = 89 * hash + (this.product != null ? this.product.hashCode() : 0);
        return hash;
    }
}
